Purity Extension
shared.purity — a reusable dependency-purity tripwire. A module declares a list of coordinate substrings that must never appear on its resolved runtime classpath; the registered checkPurity task (wired into check) fails the build if any do. Keeps a "pure leaf" module (engine / domain / pure algorithms) honest without standing up a full dependency-guard baseline.
plugins { id("shared.purity") }
purity {
forbidden.set(listOf("androidx.compose", "io.ktor", "kotlinx-coroutines"))
// configuration defaults to "jvmRuntimeClasspath"
}Content copied to clipboard
Configuration-cache safe: the resolved coordinates are read through a NamedDomainObjectProvider (a serializable handle), not a live ConfigurationContainer, so the task action never derefs the project at execution.
Properties
Link copied to clipboard
Which resolvable configuration to inspect. Defaults to jvmRuntimeClasspath.
Link copied to clipboard
Coordinate substrings that must not appear on the resolved configuration. Empty = no-op.